<script lang="ts" setup>
import { getListByConditions, urls } from '@/index';
import type { Dictionary } from '@/index.d';
import { useRequest } from 'vue-request';
const props = defineProps({
  tenant: {
    type: Number,
    default: 1
  },
  typeText: {
    type: String,
    required: true
  }
});
const getDictionlistPromise = () => {
  return getListByConditions<Dictionary>(urls.dictionary, {
    tenant: props.tenant,
    typeText: props.typeText
  });
};
const { data: dictionaryList } = useRequest(getDictionlistPromise);
</script>
<template>
  <el-option
    v-for="dictionary in dictionaryList"
    :key="dictionary?.id"
    :label="dictionary.label"
    :value="dictionary.value!"
  />
</template>
<style lang="scss" scoped></style>
